/*
 * @Desc:
 * @author cheegon
 * @date 2024/6/6  下午3:09
**/
import { apiPost, apiGet } from '../config/apiConfig'

export const reqTypeList = (params) => apiGet('/admin/type/list', params)
export const reqAllTypeList = (params) => apiGet('/admin/type/allList', params)
export const reqDelType = (id) => apiGet(`/admin/type/del/${ id }`)
export const reqEditType = (params) => apiPost('/admin/type/edit', params)
export const reqAddType = (params) => apiPost('/admin/type/add', params)


export const reqTagList = (params) => apiGet('/admin/tag/list', params)
export const reqAllTagList = (params) => apiGet('/admin/tag/allList', params)
export const reqAddTag = (params) => apiPost('/admin/tag/add', params)
export const reqEditTag = (params) => apiPost('/admin/tag/edit', params)
export const reqDelTag = (id) => apiGet(`/admin/tag/del/${ id }`)


export const reqViewCountByMonth = (params) => apiGet('/admin/getViewCountByMonth', params)
export const reqBlogCountByMonth = (params) => apiGet('/admin/getBlogCountByMonth', params)
export const reqAppreciateCountByMonth = (params) => apiGet('/admin/getAppreciateCountByMonth', params)
export const reqCommentCountByMonth = (params) => apiGet('/admin/getCommentCountByMonth', params)
export const reqCountBlog = (params) => apiGet('/admin/home/countBlog', params)

export const reqUserList = (params) => apiGet('/admin/user/list', params)
export const reqEditUser = (params) => apiPost('/admin/user/edit', params)
export const reqDelUser = (id) => apiGet(`/admin/user/delete/${ id }`)


export const reqProjectList = (params) => apiGet('/admin/project/list', params)
export const reqProjectDetail = (id) => apiGet(`/admin/project/detail/${id}`)
export const reqAddProject = (params) => apiPost('/admin/project/add', params)
export const reqEditProject = (params) => apiPost('/admin/project/edit', params)
export const reqDelProject = (id) => apiGet(`/admin/project/del/${ id }`)

export const reqEssayList = (params) => apiGet('/admin/essay/list', params)
export const reqEssayDetail = (id) => apiGet(`/admin/essay/detail/${ id }`)
export const reqAddEssay = (params) => apiPost('/admin/essay/add', params)
export const reqEditEssay = (params) => apiPost('/admin/essay/edit', params)
export const reqDelEssay = (id) => apiGet(`/admin/essay/del/${ id }`)

export const reqCommentList = (params) => apiGet('/admin/comment/list', params)
export const reqUpdateCommentStatus = (params) => apiGet('/admin/comment/updateStatus', params)
export const reqDelComment = (id) => apiGet(`/admin/comment/del/${ id }`)

export const reqMessageList = (params) => apiGet('/admin/message/list', params)
export const reqUpdateMessageStatus = (params) => apiGet('/admin/message/updateStatus', params)
export const reqDelMessage = (id) => apiGet(`/admin/message/del/${ id }`)


export const reqBlogList = (params) => apiGet('/admin/blog/list', params)
export const reqBlogDetail = (id) => apiGet(`/admin/blog/detail/${ id }`)
export const reqAddBlog = (params) => apiPost('/admin/blog/add', params)
export const reqEditBlog = (params) => apiPost('/admin/blog/edit', params)
export const reqDelBlog = (id) => apiGet(`/admin/blog/del/${ id }`)
export const reqAddBlogTag = (params) => apiPost('/admin/blog/addTag', params)
export const reqDelBlogTag = (params) => apiPost('/admin/blog/delTag', params)


export const reqUserAreaList = (params) => apiGet('/admin/getUserAreaList', params)


